import request from "../utils/request"
import store from "../store"

export const login=(data)=>{
    return request({
        method:"POST",
        url:"/newuser/login",
        data,
    });
}
export const getUserInfo=(id)=>{
    return request({
        method:"POST",
        url:"/newuser/getuserinfo",
        params:{userInfo:id},
        headers:{
            Authorization:`Bearer ${store.state.user.token}`
        },
    });

};
export const getUserChannels=()=>{
    return request({
        method:"POST",
        url:"/newuser/channels", 
    })
}



//删除用户指定频道
export const getCurrentChannels=( userId)=>{
    return request({
        method:"get",
        url:"/newuser/currentchannels", 
        params:{  userId  } 
    })
}